import request from 'utils/request'

export function getToken(data) {
  return request({
    url: '/authorizations',
    method: 'post',
    data
  })
}

export function refreshToken() {
  return request({
    url: '/authorizations/current',
    method: 'put'
  })
}

export function removeToken() {
  return request({
    url: '/authorizations/current',
    method: 'delete'
  })
}

export function modifyPassword(data) {
  return request({
    url: '/modify-password',
    method: 'patch',
    data
  })
}
